﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Mock1G3
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
                if (Session["AccountNo"] == null) Response.Redirect("Validate.aspx");
        }

        protected void btnFunction_Click(object sender, EventArgs e)
        {
            switch ((sender as Button).ID)
            {
                case "btnWithdraw":
                    Response.Redirect("Withdraw.aspx");
                    break;
                case "btnCheckBalance":
                    Response.Redirect("CheckBalance.aspx");
                    break;
                case "btnTransferCash":
                    Response.Redirect("TransferCash.aspx");
                    break;
                case "btnViewHistory":
                    Response.Redirect("ViewHistory.aspx");
                    break;
                case "btnChangePIN":
                    Response.Redirect("ChangePIN.aspx");
                    break;
                case "btnExit":
                    Session.RemoveAll();
                    ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "alert", "redirectHome();", true);
                    break;
            }
        }
    }
}